package com.bdqn.zhang.service.impl;

import com.bdqn.zhang.dao.UserDao;
import com.bdqn.zhang.pojo.Emp;
import com.bdqn.zhang.pojo.Picture;
import com.bdqn.zhang.pojo.Sysuser;
import com.bdqn.zhang.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service("userService")
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;

    @Override
    public Sysuser findUser(String username, String password) {
        return userDao.findUser(username,password);
    }


    @Override
    public List<Emp> getAllEmps(Integer limit,Integer page) {
        return userDao.getAllEmps(limit,page);
    }

    @Override
    public Long getCount() {
        return userDao.getCount();
    }

    @Override
    public Long addPicture(Picture picture) {
        return userDao.addPicture(picture);
    }

    @Override
    public List<Picture> getAllPics(Integer limit, Integer page) {
        return userDao.getAllPics(limit,page);
    }

    @Override
    public Long getPicsCount() {
        return userDao.getPicsCount();
    }
}
